package com.bjx.api.system.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @desc: 字典数据实体
 * @author: liushuai
 * @date: 2022/8/16 11:31
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(title = "DictDataVO",description = "字典数据实体")
public class DictDataVO {
    /**
    * 字典数据Id
    */
    @Schema(title = "dictDataId",description = "字典数据ID")
    private String dictDataId;

    /**
    * 字典值
    */
    @NotBlank(message = "字典值不能为空")
    @Size(min = 1,max = 64,message = "字典值长度为1到64个字符")
    @Schema(title = "value",description = "字典值")
    private String value;

    /**
    * 字典名称
    */
    @NotBlank(message = "字典名称不能为空")
    @Size(min = 1,max = 64,message = "字典名称长度为1到64个字符")
    @Schema(title = "label",description = "字典名称")
    private String label;

    /**
    * 字典样式
    */
    @Size(min = 1,max = 64,message = "字典样式长度为1到64个字符")
    @Schema(title = "classList",description = "字典样式")
    private String classList;

    /**
    * 字典类型编号
    */
    @Size(min = 1,max = 64,message = "字典类型编号长度为1到64个字符")
    @Schema(title = "dictTypeCode",description = "字典类型编号")
    private String dictTypeCode;

    /**
    * 字典标签
    */
    @Schema(title = "tag",description = "字典标签")
    @Size(min = 1,max = 16,message = "字典类型编号长度为1到16个字符")
    private String tag;

    /**
    * 是否启用(1:是/2:否)
    */
    @Range(message = "是否启用超出范围",min = 1,max = 2)
    @Schema(title = "enabled",description = "是否启用")
    private Short enabled;

    @Range(message = "序号超出范围",min = 1,max = 2147483647)
    @Schema(title = "orderNum",description = "序号")
    private Integer orderNum;
}